﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WFNetLib.GSMModem;

namespace 自消费
{
    public partial class TaskThread
    {
        void EndWapDevice()
        {
            string str;
            Com.ReadTimeout = 1000;
            int retry=100;
            ATCommand atComm = new ATCommand(Com);
            while (true)
            {
                retry--;
                if (atComm.SendAT("ATE0"))
                {
                    if (atComm.SendAT("AT+CGATT=0"))
                        break;
                    atComm.SendAT("AT+CGATT=1");
                }
            }            
        }

    }
}
